

#ifndef __CE_GEOMETRYNODE_H__
#define __CE_GEOMETRYNODE_H__

#include <cegfx/ce.h>
#include <cegfx/ceexport.h>
#include <cegfx/cenode.h>
#include <list>

class ceMaterial;
struct iGeometry;
struct iGeometryAnimator;
class CE_GFX_API ceGeometryNode : public  ceNode
{
	IQF_DECLARATION;
private:

	iGeometry*					geometry;

	ceMaterial*					material;

	iGeometryAnimator*	animator;

	bool								transparency;

protected:
	void UpdateBoundingBox ();
	void UpdateBoundingBox (D3DXMATRIX* matrix, ceBoundingBox* bbox);

public:
	ceGeometryNode ();
	~ceGeometryNode ();

	void SetGeometry (iGeometry* geometry);
	iGeometry* GetGeometry ();
	const iGeometry* GetGeometry () const;

	void SetMaterial (ceMaterial* material);
	ceMaterial* GetMaterial ();
	const ceMaterial* GetMaterial () const;

	void SetGeometryAnimator (iGeometryAnimator* animator);
	iGeometryAnimator* GetGeometryAnimator ();
	const iGeometryAnimator* GetGeometryAnimator () const;

	void SetTransparency (bool transparency);
	bool HasTransparency () const;

	virtual void Update (const ceUpdateEnv& env);
};

typedef ceGeometryNode *ceGeometryNodePtr;
typedef std::list<ceGeometryNodePtr> ceGeometryNodeList;



#endif /* ! __CE_RENDERNODE_H__ */
